package git.soulbgm.feign.service;

import git.soulbgm.feign.pojo.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

/**
 * @author 贺瑞杰
 * @version V1.0
 * @date 2018-09-28 14:47
 * @description @FeignClient(name = "producer") 标明feign调用的微服务名称
 */
@FeignClient(name = "PRODUCER")
public interface DemoService {

    @RequestMapping(value = "/hello", method = RequestMethod.POST)
    String hello(@RequestBody User user);

    @RequestMapping(value = "/hello2", method = RequestMethod.GET)
    String hello2(@RequestParam Map<String, Object> map);

    @RequestMapping(value = "/test", method = RequestMethod.GET)
    String test(@RequestParam("str") String str);

}
